<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="java.util.*" %>
<jsp:useBean id="loginBean" class="mybean.data.login" scope="session"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>退回押金</title>
	<link rel="stylesheet" type="text/css" href="css/reset.css">
	<link rel="stylesheet" type="text/css" href="css/common.css">
	<link rel="stylesheet" type="text/css" href="css/index-1.css">
	<link rel="stylesheet" type="text/css" href="css/index-2.css">
</head>
<body>
	<%@ include file="head.txt" %>
	<%	request.setCharacterEncoding("utf-8");
		if(loginBean==null){
			out.println("<script language = javascript>alert('请重新登录!');");
			out.println("location.href='index.jsp'</script>");
			return;
		}
		else{
			boolean b=loginBean.getLogname()==null || loginBean.getLogname().length()==0;
			if(b){
				out.println("<script language = javascript>alert('请重新登录!');");
				out.println("location.href='index.jsp'</script>");
				return;
			}
		}
		String deposit=loginBean.getdeposit();//获取用户押金
		System.out.println(deposit);
		if(deposit.equals("0.0")){
			out.println("<script language = javascript>alert('你还没有交押金!');");
			out.println("location.href='homepage.jsp'</script>");
			return;
		}
		else{
	%><center class="Admin-content"><h3>我的押金为： &nbsp;<%=deposit %>元</h3><br>
			<form action="returnDepositServlet" method="post">					
				<input type="submit" name="g" value="退押金" class='submit'>
			</form>
		</center>
		<%}
	%>
</body>
</html>